﻿#define USE_SLIMDX
//#define USE_XNA

#region Dependencies

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Text;
using System.Runtime.InteropServices;
using System.Reflection;
using System.Threading;
using System.Windows.Forms;
using System.Security;

using XNA = Microsoft.Xna.Framework;
using SDX = SlimDX;
using SysDrawing = System.Drawing;
using PhysX = StillDesign.PhysX;
using BEPU = BEPUphysics;

#if USE_SLIMDX
using SlimDX;
using SlimDX.Direct3D10;
using SlimDX.DirectInput;
using SlimDX.DirectSound;
using SlimDX.DirectWrite;
using SlimDX.DXGI;
using SlimDX.Multimedia;
using SlimDX.Windows;
using SlimDX.X3DAudio;
using SlimDX.XACT3;
using SlimDX.XAPO;
using SlimDX.XAudio2;
#endif

#if USE_XNA
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Design;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

using Xen2D;
using XenAspects;
using XenGameBase;
#endif

#endregion // Dependencies

using Blackrain;

namespace Blackrain.Graphics
{
    public class D3D9_Device
    {
        private SlimDX.Direct3D9.Device device = null;
        private SlimDX.Direct3D9.SwapChain swapChain = null;

        public D3D9_Device()
        {
            var description = new SwapChainDescription()
            {
                BufferCount = 1,
                Usage = Usage.RenderTargetOutput,
                OutputHandle = BlackrainEngine.GetRenderWindow().Handle,
                IsWindowed = true,
                ModeDescription = new ModeDescription( 0, 0, new Rational( 60, 1 ), Format.R8G8B8A8_UNorm ),
                SampleDescription = new SampleDescription( 1, 0 ),
                Flags = SwapChainFlags.AllowModeSwitch,
                SwapEffect = SwapEffect.Discard
            };
        }
    }
}
